##ENSURE SPREADSHEET IS FILTERED FIRST RUN_DATE (oldest to newest) then by DATETIME (oldest to newest)

Clean data: Look at sample concentrations for each day. Select which value from different run (out of the series of duplicate and dilution runs)

350

Raw Visualize

Create good_id vector for site 350

# Points to background correct
good_id_mc3_bg<-c(85:91, 899:906, 235:237, 1049:1051, 265:268, 1079:1080, 1893, 1894, 1896, 280:283, 1908:1911, 667:670,672, 149:153, 963:967, 706:708, 1520:1522, 2334:2336, 167, 168, 170, 171, 981:984, 1795, 1796)#350

good_id_mc3_fall<-c(301:309, 907:909, 1014:1016, 320, 351:360, 430, 1052:1063, 373, 375:379, 381:384, 1085:1086, 1898:1904, 385:387, 389:393, 1912:1917, 1950:1954, 674, 676:683, 627:632, 634:636, 972:975, 977:980, 716, 718, 719, 721, 723, 724, 638:643, 988:997, 1797, 1799:1811) #350

450

Raw Visualize

Create good_id vector for site 450

# Points to background correct
good_id_mc_bg<- c(good_id_mc3_bg, 205:208, 222:224, 1019,1020,1036:1038, 250:252, 1064:1066, 327:329, 1141,1143, 1955:1957, 483:486, 1156,1157, 1159, 2111:2114, 653:655, 184:187, 998:1001, 520:524, 1334:1338, 209, 211, 212, 1023:1026, 1837:1840) #450

good_id_mc_fall<-c(good_id_mc3_fall, 310:313, 315:319, 1039:1048, 361:372, 1067:1069, 1381:1389, 397:400, 1145, 1149:1155, 1959:1969, 403:409, 1160:1161, 1162, 1304:1308, 1310, 1598, 2115, 2116, 655:664, 644:646, 648:652, 1003:1007, 1010, 1341:1349) #450

good_id_mc<- c(good_id_mc_bg, good_id_mc_fall)
## # A tibble: 1 x 1
##       n
##   <int>
## 1    65

350

Visualize Selected Data

450

Visualize Selected Data

# c4<-map(chem_clean_nest_mc$data, loc='450', w=1200, h=500, plotChem)
# 
# c4[[1]]
# c4[[2]]
# c4[[3]]
# c4[[4]]
# c4[[5]]
# c4[[6]]
# c4[[7]]
# c4[[8]]

export for UNM team

# # data for UNM
# library(chron)
# 
# cl_conc<-chem_clean_long_mc%>%
#   filter(site == '450')%>%
#   filter(date %in% ymd(c('2018-07-17' , '2018-07-19')))%>%
#   filter(var =='Cl')%>%
#   filter(MaxDL_flag == 'No')
# 
# cl_times<-times(format(cl_conc$datetime, "%H:%M:%S"))
# 
# cl_final<-cbind(cl_conc, cl_times)
# 
# write_csv(cl_final,"data/out/cl_071718_071918_csu_ic-times.csv" )

Summarize to get mean BG conc per day